import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
const index = "";
const ButtonType = ["primary", "success", "info", "warning", "danger", "text"];
const ButtonSize = ["midium", "small", "mini"];
const buttonProps = {
  type: {
    type: String,
    validator(value) {
      return ButtonType.includes(value);
    }
  },
  plain: Boolean,
  round: Boolean,
  disabled: Boolean,
  icon: String,
  iconPosition: String,
  size: {
    type: String,
    validator(value) {
      return ButtonSize.includes(value);
    }
  }
};
const _sfc_main = defineComponent({
  name: "MButton",
  props: buttonProps,
  setup(props) {
    const styleClass = computed(() => {
      return {
        [`m-button--${props.type}`]: props.type,
        "is-plain": props.plain,
        "is-round": props.round,
        "is-disabled": props.disabled,
        [`m-button--${props.size}`]: props.size
      };
    });
    const iconFont = computed(() => {
      const iconName = props.icon;
      const position = props.iconPosition;
      return {
        iconName,
        position
      };
    });
    return {
      styleClass,
      iconFont
    };
  }
});
const _export_sfc = (sfc, props) => {
  const target = sfc.__vccOpts || sfc;
  for (const [key, val] of props) {
    target[key] = val;
  }
  return target;
};
const _hoisted_1 = { class: "m-button-text" };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return openBlock(), createElementBlock("button", {
    class: normalizeClass(["m-button", _ctx.styleClass])
  }, [
    createElementVNode("div", _hoisted_1, [
      renderSlot(_ctx.$slots, "default")
    ])
  ], 2);
}
const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
Button.install = function(app) {
  app.component(Button.name, Button);
};
export {
  Button as default
};
